var context = 1
var container = document.getElementById('container')
function getUserAction () {
  container.innerHTML = context++
}
function throttle (fn, wait = 2000) {
  var context, args
  var pre = 0
  var context = this
  return function () {
    var now = + new Date()
    context = this
    args = arguments
    if (wait < now - pre) {
      pre = now
      fn.apply(context, args)
    }
  }
}
container.onmousemove = throttle(getUserAction, 2000)
